using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._RasterProperties
{
    /// <summary>
    /// <para>Build Raster Attribute Table</para>
    /// <para>Create or update a table with information about the classes in your raster datasets. This is used primarily with discrete data.</para>
    /// <para>使用栅格数据集中类的相关信息创建或更新表。这主要用于离散数据。</para>
    /// </summary>    
    [DisplayName("Build Raster Attribute Table")]
    public class BuildRasterAttributeTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BuildRasterAttributeTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The input raster dataset to which a table will be added. This tool will not run if the pixel type is floating point or double precision.</para>
        /// <para>将向其添加表的输入栅格数据集。如果像素类型为浮点数或双精度，则此工具将无法运行。</para>
        /// </param>
        public BuildRasterAttributeTable(object _in_raster)
        {
            this._in_raster = _in_raster;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Build Raster Attribute Table";

        public override string CallName => "management.BuildRasterAttributeTable";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_raster, _overwrite.GetGPValue(), _out_raster];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The input raster dataset to which a table will be added. This tool will not run if the pixel type is floating point or double precision.</para>
        /// <para>将向其添加表的输入栅格数据集。如果像素类型为浮点数或双精度，则此工具将无法运行。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Overwrite</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the existing table will be overwritten.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The existing raster attribute table will not be overwritten, and any edits will be appended to the current table. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The existing raster attribute table will be overwritten and a new raster attribute table will be created.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否覆盖现有表。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 现有栅格属性表不会被覆盖，所有编辑内容都将追加到当前表中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将覆盖现有栅格属性表，并创建新的栅格属性表。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Overwrite")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _overwrite_value _overwrite { get; set; } = _overwrite_value._false;

        public enum _overwrite_value
        {
            /// <summary>
            /// <para>Overwrite</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Overwrite")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_raster { get; set; }


        public BuildRasterAttributeTable SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}